<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>商户审核</title>
<link rel='stylesheet' href='/stylesheets/bootstrap.css' />
<style type="text/css">body {padding-top: 60px;padding-bottom: 40px;}
.controls{padding:10px 10% 10px 10%;}
tr{text-align: center;}
td{padding:10px 0px 10px 0px;}
</style>
<script src="/javascripts/jquery.js"></script>
<script src="/javascripts/bootstrap.js"></script>
<script>
	$('.yanzheng').live('click',function(){
		obj = $(this);
		fobj = obj.parent().parent().parent();
		mid = fobj.attr('alt');
		if($(this).html()=="通过"){
			fobj.find(".zhuangtai").attr('style','color:red').html("已审核");
			$(this).attr('alt','取消通过');
			$(this).html("取消通过");		
			$.post("",{mid:mid,type:"1",rand:Math.random()},function(s){
				
			})
		}
		else{
			fobj.find(".zhuangtai").attr('style','').html("未审核");
			obj.attr('alt','通过');
			obj.html("通过");		
			$.post("",{mid:mid,type:"0",rand:Math.random()},function(s){	

			})
		}
	})
</script>
<link href="/stylesheets/bootstrap-responsive.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</a>
			<a class="brand">商户审核</a>
			<div class="nav-collapse">
				<ul class="nav">
					<li><a href="?s=1">未审核</a></li>
					<li><a href="?s=2">已审核</a></li>
					<li><a href="?s=all">全部</a></li>
				</ul>
			</div>
		</div>
	</div>
</div>
<div class="controls">
	<table width="100%" class="table_border" width="100%" border="0" id="high_light" lang="tabRowData" cellpadding="0" cellspacing="0">
		<tr style="background-color: #E8EAF3;">
			<td width="6%">商户名称<td>
			<td width="20%">商户图片1<td>
			<td width="20%">商户图片2<td>
			<td width="20%">商户说明<td>
			<td width="20%">发布时间<td>
			<td width="7%">状态<td>
			<td width="7%">操作<td>
		</tr>
<% var i=0; %>
<% data.forEach(function(row){%>
		<%  i++; 
			var addtime = new Date(parseInt(row.addtime) * 1000).toLocaleString().replace(/:\d{1,2}$/," ");
			var zt = row.check?"已审核":"未审核";
			var ztys = row.check?"color:red":"";
			var gbzt = row.check?"取消通过":"通过";
		%>
		
		<tr class="list<%= i; %>" alt="<%= row.id %>">
			<td><%= row.merchantName %><td>
			<td><img src="<%= row.picturePath1 %>" /><td>
			<td><img src="<%= row.picturePath2 %>" /><td>
			<td><%= row.annotate %><td>
			<td><%= addtime %><td>
			<td><a href="javascript:;" class="zhuangtai" style="<%= ztys %>"><%= zt %></a><td>
			<td>
				<span><a href="javascript:;" class="yanzheng" alt="<%= gbzt %>"><%= gbzt %></a></span>
			<td>
		</tr>
<% }) %>
	</table>
</div>
<div id="container" class="container">
	<hr />
	<footer>
		<p>
			
		</p>
	</footer>
</div>
</body>